(function () {
  let myChart = echarts.init(document.querySelector(".r3"));
  let option;

  option = {
    legend: {
      top: "top",
    },
    series: [
      {
        name: "Nightingale Chart",
        type: "pie",
        radius: [40, 80],
        center: ["50%", "50%"],
        roseType: "area",
        itemStyle: {
          borderRadius: 10,
        },
        data: [
          { value: 40, name: "图 1" },
          { value: 38, name: "图 2" },
          { value: 32, name: "图 3" },
          { value: 30, name: "图 4" },
          { value: 28, name: "图 5" },
        ],
      },
    ],
  };
  myChart.setOption(option);

  window.addEventListener("resize", () => {
    myChart.resize();
  });
})();
